<template>
	<view>
		<!-- 预定 -->
		<view style="width: 710rpx;margin: 40rpx 20rpx 0rpx;" class="rows">
			<view @click="selecta(item.id)" class="header_nav" :class="item.id == selectb?'selectc' : ''" v-for="(item,index) in headerNav" :key="index">
				<view>{{item.name}}</view>
				<view v-if="index!='0'" class="header_n_count">{{index * 3}}</view>
			</view>
		</view>
		<view style="width: 710rpx;margin: 20rpx 20rpx;">
			<view class="order_totals" v-for="(item,index) in 7" :key="index">
				<view class="rowsb" style="padding: 0rpx 20rpx;">
					<view class="fs28 col333 bold">某某大酒店</view>
					<view class="fs26 col333">d5s6gds65g65ds1g56</view>
				</view>
				<view class="order_shang_pin rows">
					<image src="" mode="" style="max-width: 220rpx;height: 220rpx;border-radius: 8rpx;background-color: #F1F1F1;"></image>
					<view class="order_shang_right rowsa w100">
						<view class="fs26 col333">济南市历下区海尔时代大厦</view>
						<view class="fs26 col333">08-22至08-23 1晚/1间</view>
						<view class="fs26 col333">状态：待付款</view>
					</view>
				</view>
				<view class="rowse fs28 bold" style="color: #D2465C;padding: 0rpx 20rpx 0rpx;">￥100</view>
				<view class="rowse" style="padding: 8rpx 20rpx;">
					<view class="select_aaa">查看详情</view>
					<view class="select_bbb">立即支付</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				headerNav:[
					{name:'全部',id:'0'},
					{name:'待支付',id:'1'},
					{name:'待发货',id:'2'},
					{name:'待收货',id:'3'},
					{name:'已收货',id:'4'},
				],
				selectb:'0',//当前选择
			}
		},
		methods: {
			selecta(event) {//顶部的选择
				if(this.selectb == event) return false;//如果相同 结束
				this.selectb = event;//赋值
			},
		}
	}
</script>

<style scoped>
	.header_nav {
		font-size: 30rpx;
		color: #B3B3B3;
		padding: 0rpx 0rpx 16rpx;
		position: relative;
		text-align: center;
		flex: 0 0 20%;
	}
	.selectc {
		color: #1A1A1A;
		font-weight: bold;
		border-bottom: 6rpx solid #1A1A1A;
	}
	.header_n_count {
		position: absolute;
		top: -20rpx;right: 0rpx;
		font-size: 20rpx;
		border-radius: 50%;
		padding: 2rpx 10rpx;
		background-color: #D2465C;
		color: #FFFFFF;
	}
	.order_totals {
		padding: 20rpx 0rpx;
		background-color: #F9F9F9;
		border-radius: 8rpx;
		box-shadow: 2rpx 2rpx 6rpx 2rpx rgba(136,136,136,0.24);
		margin: 25rpx 0rpx;
	}
	.order_shang_right {
		width: 100%;height: 220rpx;
		padding-left: 16rpx;
		flex-direction: column;
	}
	.order_shang_pin {
		padding: 20rpx 20rpx;
		border-top: 3rpx solid #F5F5F5;
	}
	.select_aaa {
		width: 180rpx;height: 67rpx;
		line-height: 67rpx;
		border: 3rpx solid #808080;
		border-radius: 8rpx;
		color: #1A1A1A;
		text-align: center;
		font-size: 30rpx;
	}
	.select_aaa + .select_aaa {
		margin-left: 16rpx;
	}
	.select_bbb {
		width: 180rpx;height: 70rpx;
		line-height: 70rpx;
		background-color: #FB3D59;
		border-radius: 8rpx;
		color: #FFFFFF;
		text-align: center;
		font-size: 30rpx;
		margin-left: 16rpx;
	}
</style>
